import './App.css';
import React from 'react';
import { Routes, Route, useRoutes  } from 'react-router-dom';
import {Provider} from 'react-redux'
import store from './store/authSlice'

import routes from './router'   //路由表

function App() {
  const elements = useRoutes(routes)
  return (
    // React.Fragment
    // 一个专门作为父容器的组件
    <React.Fragment>
      <Provider store={store}>
        {elements}
      </Provider>
    </React.Fragment>
  );
}

export default App;
